package com.egg.basic.fegin;

import com.egg.basic.fegin.fallback.BasicPayFeignClientFallback;
import com.egg.basic.model.request.PayPost;
import com.egg.basic.model.request.RefundPost;
import com.egg.common.core.model.response.ResponseData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


@FeignClient(
        value = "basic"
        , url = "${api.feign.url.basic:}"
        , fallbackFactory = BasicPayFeignClientFallback.class
)
public interface BasicPayFeignClient {


    @PostMapping("/feign/pay")
    ResponseData<String> pay(@RequestBody PayPost param);

    @PostMapping("/feign/refund")
    ResponseData<String> refund(@RequestBody RefundPost param);


}
